package com.threefish.common.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;

/**
 * @author 黄川 huchuc@vip.qq.com
 * @date: 2018/9/10
 */
@Component
@ConfigurationProperties(prefix = "fw.sys", ignoreInvalidFields = true)
public class SysProperties {

    /**
     * 第一次登录后需要修改密码
     */
    private boolean fristLoginNeedChangePass;

    /**
     * 密码定时过期-按月-3个月过期提醒 0永不过期
     */
    private int passExpired;


    /**
     * 0无验证  1字母加数字不小于6位  2字母大小写都有加数字  3字母大小写都有加数字加特殊字符
     */
    private int passStrength;

    /**
     * 登录错误次数限制 输入次数-冻结15分钟
     */
    private int errorPassInputTimes;

    /**
     * 登录错误多少次需要输入验证码 -1 不需要验证码 0一直需要
     */
    private int needVerificationCode;

    /**
     * 系统版本号
     */
    private String version;

    /**
     * 系统注册码
     */
    private String registrationCode;

    /**
     * 注册时间
     */
    private Timestamp registrationTime;

    /**
     * 单位名称-当单位名称修改后注册码失效-需要重新注册
     */
    private String unitName;

    /**
     * 系统名称
     */
    private String productLongName;

    /**
     * 系统英文名称
     */
    private String productEnLongName;

    /**
     * 系统logo图片
     */
    private String productLogo;


    /**
     * 系统默认主题
     */
    private int theme;

    /**
     * 系统简称
     */
    private String productSortName;

    public int getTheme() {
        return theme;
    }

    public void setTheme(int theme) {
        this.theme = theme;
    }

    public int getNeedVerificationCode() {
        return needVerificationCode;
    }

    public void setNeedVerificationCode(int needVerificationCode) {
        this.needVerificationCode = needVerificationCode;
    }

    public String getProductEnLongName() {
        return productEnLongName;
    }

    public void setProductEnLongName(String productEnLongName) {
        this.productEnLongName = productEnLongName;
    }

    public String getProductLogo() {
        return productLogo;
    }

    public void setProductLogo(String productLogo) {
        this.productLogo = productLogo;
    }

    public int getPassStrength() {
        return passStrength;
    }

    public void setPassStrength(int passStrength) {
        this.passStrength = passStrength;
    }

    public Timestamp getRegistrationTime() {
        return registrationTime;
    }

    public void setRegistrationTime(Timestamp registrationTime) {
        this.registrationTime = registrationTime;
    }

    public boolean isFristLoginNeedChangePass() {
        return fristLoginNeedChangePass;
    }

    public void setFristLoginNeedChangePass(boolean fristLoginNeedChangePass) {
        this.fristLoginNeedChangePass = fristLoginNeedChangePass;
    }


    public int getPassExpired() {
        return passExpired;
    }

    public void setPassExpired(int passExpired) {
        this.passExpired = passExpired;
    }

    public int getErrorPassInputTimes() {
        return errorPassInputTimes;
    }

    public void setErrorPassInputTimes(int errorPassInputTimes) {
        this.errorPassInputTimes = errorPassInputTimes;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getRegistrationCode() {
        return registrationCode;
    }

    public void setRegistrationCode(String registrationCode) {
        this.registrationCode = registrationCode;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getProductLongName() {
        return productLongName;
    }

    public void setProductLongName(String productLongName) {
        this.productLongName = productLongName;
    }

    public String getProductSortName() {
        return productSortName;
    }

    public void setProductSortName(String productSortName) {
        this.productSortName = productSortName;
    }

}
